var mothlyCost = 0;
var cost = function (money) {
    mothlyCost+=money
}
cost(100)
cost(200)
cost(300)
cost(700)
console.log(mothlyCost);